
package pages;

import listdata.ListData;

import org.apache.wicket.markup.html.form.ChoiceRenderer;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.model.Model;


public class DropDownPage extends BasePage {
	
	public DropDownPage(){
		ChoiceRenderer choiceRenderer = new ChoiceRenderer("firstName", "lastName");
		DropDownChoice select = new DropDownChoice("select");
		select.setChoices(ListData.fillCustomerList());
		select.setChoiceRenderer(choiceRenderer);
		add(select);
		
		
		DropDownChoice selected = new DropDownChoice("selected");
		selected.setChoices(ListData.fillCustomerList());
		selected.setChoiceRenderer(choiceRenderer);
		selected.setModel(new Model(ListData.getCustomerById(3)));
		add(selected);
	}
	
}
